home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Interfaces / Universal Interfaces / PictUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-30  |  5.8 KB  |  161 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        PictUtil.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __PICTUTIL__
  13. #define __PICTUTIL__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. #ifndef __PALETTES__
  23. #include <Palettes.h>
  24. /*    #include <Quickdraw.h>                                        */
  25. /*        #include <QuickdrawText.h>                                */
  26. /*            #include <IntlResources.h>                            */
  27. /*    #include <Windows.h>                                        */
  28. /*        #include <Events.h>                                        */
  29. /*            #include <OSUtils.h>                                */
  30. /*        #include <Controls.h>                                    */
  31. /*            #include <Menus.h>                                    */
  32. #endif
  33.  
  34.  
  35. /* verbs for the GetPictInfo, GetPixMapInfo, and NewPictInfo calls */
  36.  
  37. #define returnColorTable ((short) 0x0001)
  38.  
  39. #define returnPalette ((short) 0x0002)
  40.  
  41. #define recordComments ((short) 0x0004)
  42.  
  43. #define recordFontInfo ((short) 0x0008)
  44.  
  45. #define suppressBlackAndWhite ((short) 0x0010)
  46.  
  47. enum  {
  48. /* color pick methods */
  49.     systemMethod                = 0,                            /* system color pick method */
  50.     popularMethod                = 1,                            /* method that chooses the most popular set of colors */
  51.     medianMethod                = 2,                            /* method that chooses a good average mix of colors */
  52. /* color bank types */
  53.     ColorBankIsCustom            = -1,
  54.     ColorBankIsExactAnd555        = 0,
  55.     ColorBankIs555                = 1
  56. };
  57.  
  58. typedef long PictInfoID;
  59.  
  60. #if defined(powerc) || defined (__powerc)
  61. #pragma options align=mac68k
  62. #endif
  63. struct CommentSpec {
  64.     short                        count;                            /* number of occurrances of this comment ID */
  65.     short                        ID;                                /* ID for the comment in the picture */
  66. };
  67. #if defined(powerc) || defined(__powerc)
  68. #pragma options align=reset
  69. #endif
  70.  
  71. typedef struct CommentSpec CommentSpec;
  72.  
  73. typedef CommentSpec *CommentSpecPtr, **CommentSpecHandle;
  74.  
  75. #if defined(powerc) || defined (__powerc)
  76. #pragma options align=mac68k
  77. #endif
  78. struct FontSpec {
  79.     short                        pictFontID;                        /* ID of the font in the picture */
  80.     short                        sysFontID;                        /* ID of the same font in the current system file */
  81.     long                        size[4];                        /* bit array of all the sizes found (1..127) (bit 0 means > 127) */
  82.     short                        style;                            /* combined style of all occurrances of the font */
  83.     long                        nameOffset;                        /* offset into the fontNamesHdl handle for the font’s name */
  84. };
  85. #if defined(powerc) || defined(__powerc)
  86. #pragma options align=reset
  87. #endif
  88.  
  89. typedef struct FontSpec FontSpec;
  90.  
  91. typedef FontSpec *FontSpecPtr, **FontSpecHandle;
  92.  
  93. #if defined(powerc) || defined (__powerc)
  94. #pragma options align=mac68k
  95. #endif
  96. struct PictInfo {
  97.     short                        version;                        /* this is always zero, for now */
  98.     long                        uniqueColors;                    /* the number of actual colors in the picture(s)/pixmap(s) */
  99.     PaletteHandle                thePalette;                        /* handle to the palette information */
  100.     CTabHandle                    theColorTable;                    /* handle to the color table */
  101.     Fixed                        hRes;                            /* maximum horizontal resolution for all the pixmaps */
  102.     Fixed                        vRes;                            /* maximum vertical resolution for all the pixmaps */
  103.     short                        depth;                            /* maximum depth for all the pixmaps (in the picture) */
  104.     Rect                        sourceRect;                        /* the picture frame rectangle (this contains the entire picture) */
  105.     long                        textCount;                        /* total number of text strings in the picture */
  106.     long                        lineCount;                        /* total number of lines in the picture */
  107.     long                        rectCount;                        /* total number of rectangles in the picture */
  108.     long                        rRectCount;                        /* total number of round rectangles in the picture */
  109.     long                        ovalCount;                        /* total number of ovals in the picture */
  110.     long                        arcCount;                        /* total number of arcs in the picture */
  111.     long                        polyCount;                        /* total number of polygons in the picture */
  112.     long                        regionCount;                    /* total number of regions in the picture */
  113.     long                        bitMapCount;                    /* total number of bitmaps in the picture */
  114.     long                        pixMapCount;                    /* total number of pixmaps in the picture */
  115.     long                        commentCount;                    /* total number of comments in the picture */
  116.     long                        uniqueComments;                    /* the number of unique comments in the picture */
  117.     CommentSpecHandle            commentHandle;                    /* handle to all the comment information */
  118.     long                        uniqueFonts;                    /* the number of unique fonts in the picture */
  119.     FontSpecHandle                fontHandle;                        /* handle to the FontSpec information */
  120.     Handle                        fontNamesHandle;                /* handle to the font names */
  121.     long                        reserved1;
  122.     long                        reserved2;
  123. };
  124. #if defined(powerc) || defined(__powerc)
  125. #pragma options align=reset
  126. #endif
  127.  
  128. typedef struct PictInfo PictInfo;
  129.  
  130. typedef PictInfo *PictInfoPtr, **PictInfoHandle;
  131.  
  132. #ifdef __cplusplus
  133. extern "C" {
  134. #endif
  135.  
  136. extern pascal OSErr GetPictInfo(PicHandle thePictHandle, PictInfo *thePictInfo, short verb, short colorsRequested, short colorPickMethod, short version)
  137.  THREEWORDINLINE(0x303C, 0x0800, 0xA831);
  138. extern pascal OSErr GetPixMapInfo(PixMapHandle thePixMapHandle, PictInfo *thePictInfo, short verb, short colorsRequested, short colorPickMethod, short version)
  139.  THREEWORDINLINE(0x303C, 0x0801, 0xA831);
  140. extern pascal OSErr NewPictInfo(PictInfoID *thePictInfoID, short verb, short colorsRequested, short colorPickMethod, short version)
  141.  THREEWORDINLINE(0x303C, 0x0602, 0xA831);
  142. extern pascal OSErr RecordPictInfo(PictInfoID thePictInfoID, PicHandle thePictHandle)
  143.  THREEWORDINLINE(0x303C, 0x0403, 0xA831);
  144. extern pascal OSErr RecordPixMapInfo(PictInfoID thePictInfoID, PixMapHandle thePixMapHandle)
  145.  THREEWORDINLINE(0x303C, 0x0404, 0xA831);
  146. extern pascal OSErr RetrievePictInfo(PictInfoID thePictInfoID, PictInfo *thePictInfo, short colorsRequested)
  147.  THREEWORDINLINE(0x303C, 0x0505, 0xA831);
  148. extern pascal OSErr DisposePictInfo(PictInfoID thePictInfoID)
  149.  THREEWORDINLINE(0x303C, 0x0206, 0xA831);
  150. #if OLDROUTINENAMES
  151. #define DisposPictInfo(thePictInfoID) DisposePictInfo(thePictInfoID)
  152.  
  153. #endif
  154.  
  155. #ifdef __cplusplus
  156. }
  157. #endif
  158.  
  159. #endif
  160.  
  161.